-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Scoped clusters #7039
feat: Scoped clusters #7039
Conversation
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: Victor Plakyda <[email protected]> Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: Victor Plakyda <[email protected]> Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: Victor Plakyda <[email protected]> Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: Victor Plakyda <[email protected]> Signed-off-by: pashavictorovich <[email protected]>
# Conflicts: # ui/src/app/applications/components/application-retry-options/application-retry-options.tsx # ui/src/app/applications/components/applications-sync-panel/applications-sync-panel.tsx # ui/src/app/shared/models.ts
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
…efresh/argo-cd into scoped-clusters
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: pashavictorovich <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #7039 +/- ##
=======================================
Coverage 41.07% 41.07%
=======================================
Files 158 158
Lines 21305 21341 +36
=======================================
+ Hits 8750 8766 +16
- Misses 11303 11313 +10
- Partials 1252 1262 +10
Continue to review full report at Codecov.
|
util/argo/argo.go
Outdated
@@ -421,6 +435,10 @@ func GetAppProjectByName(name string, projLister applicationsv1.AppProjectLister | |||
for _, repo := range repos { | |||
project.Spec.SourceRepos = append(project.Spec.SourceRepos, repo.Repo) | |||
} | |||
clusters := retrieveScopedClusters(name, db, ctx) | |||
for _, cluster := range clusters { | |||
project.Spec.Destinations = append(project.Spec.Destinations, argoappv1.ApplicationDestination{Server: cluster.Server, Namespace: "*"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cluster might be connected in a "namespaced" mode - cluster.Namespaces
is not empty. In this case only these namespaces should be auto-added to the destination. E.g.
if len(cluster.Namespaces) == 0 {
project.Spec.Destinations = append(project.Spec.Destinations, argoappv1.ApplicationDestination{Server: cluster.Server, Namespace: "*"})
} else {
for _, ns := range cluster.Namespaces {
project.Spec.Destinations = append(project.Spec.Destinations, argoappv1.ApplicationDestination{Server: cluster.Server, Namespace: ns})
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @pasha-codefresh ! Found only one minor issue and it is ready to go
Signed-off-by: pashavictorovich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, is there a PR description or an issue I could read up ? :( |
hello @sbose78 . Sure, here it is: #5283. We also discussed implementation in the proposal: https://github.com/argoproj/argo-cd/blob/master/docs/proposals/project-repos-and-clusters.md |
feat: Scoped clusters (argoproj#7039) Signed-off-by: pashavictorovich <[email protected]> Signed-off-by: viktorplakida <[email protected]>
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: